import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:liuxlcommon/view/lxl_widget.dart';
import 'package:liuxlcommon/view/my_box.dart';
import 'package:love_newf/generated/assets.dart';

class SexAgeLabel extends StatelessWidget {
  /// 1 男，2 女
  int sex;
  int age;

  SexAgeLabel(this.sex, this.age, {super.key});

  @override
  Widget build(BuildContext context) => LRow.eazy([
        LImage.easy(sex == 1 ? Assets.iconMan : Assets.iconWoman, 9.w, 9.w),
        3.lsw,
        LText.easy(age == 0 ? "18" : age.toString(), 10.w, null, Colors.white)
      ]).radius(15.w).size(null, 15.w).padding(left: 6.w, right: 5.w).gradient(
          sex == 1
              ? const [Color(0xFFFF4062), Color(0xFFFFAD61)]
              : const [Color(0xFFFF4062), Color(0xFFFFAD61)],
          Alignment.centerRight);
}
